package centers

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type CentersRouter struct {
}

// InitCentersRouter 初始化 Centers 路由信息
func (s *CentersRouter) InitCentersRouter(Router *gin.RouterGroup) {
	centerRouter := Router.Group("center").Use(middleware.OperationRecord())
	centerRouterWithoutRecord := Router.Group("center")
	var centerApi = v1.ApiGroupApp.CentersApiGroup.CentersApi
	{
		centerRouter.POST("createCenters", centerApi.CreateCenters)   // 新建Centers
		centerRouter.DELETE("deleteCenters", centerApi.DeleteCenters) // 删除Centers
		centerRouter.DELETE("deleteCentersByIds", centerApi.DeleteCentersByIds) // 批量删除Centers
		centerRouter.PUT("updateCenters", centerApi.UpdateCenters)    // 更新Centers
	}
	{
		centerRouterWithoutRecord.GET("findCenters", centerApi.FindCenters)        // 根据ID获取Centers
		centerRouterWithoutRecord.GET("getCentersList", centerApi.GetCentersList)  // 获取Centers列表
	}
}
